Given the following class, what are the names of its constructor and destructor functions? class widgit { int x, y; public : //.....fill in constructor and destructor functions };

      

Given the following class, what are the names of its constructor and destructor functions?
class widgit {
int x, y;
public :
//.....fill in constructor and destructor functions
};

  

Answers


Davis
The constructor is called widgit() and the destructor is called ~widgit()
Githiari answered the question on May 12, 2018 at 16:41


Next: Create a class called dice that contains one private integer variable.Create a function called roll() that uses the standard randomn number generator, rand(), to generate...
Previous: Given the following base class, show how it can be inherited by a derived class called mars class planet { int moons; double dist_from_sun; double diameter; double mass public: // ... };

View More Computer Science Questions and Answers | Return to Questions Index


Exams With Marking Schemes

Related Questions